import java.util.Stack;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2024-04-01
 * Time: 20:55
 */
public class Test {
    public static void main(String[] args) {
        MinStack minStack = new MinStack();
        minStack.push(512);
        minStack.push(-1024);
        minStack.push(-1024);
        minStack.push(512);
        minStack.pop();
        System.out.println(minStack.getMin());
        minStack.pop();
        System.out.println(minStack.getMin());
        minStack.pop();
        System.out.println(minStack.getMin());
    }

    /*public static void main1(String[] args) {
        Stack<Integer> stack1 = new Stack<>();
        Stack<Integer> stack2 = new Stack<>();
        stack1.push(1);
        stack2.push(1);
        System.out.println(stack1.peek() == stack2.peek());

    }*/

    /*Stack<Integer> stack = new Stack<>();
    int j = 0;
        for(int i = 0; i < pushV.length; i++) {
        stack.push(pushV[i]);
        while(j < popV.length && !stack.empty() && stack.peek() == popV[j]) {
            stack.pop();
            j++;
        }
    }
        return stack.empty();
*/

    /*public boolean isValid(String s) {
        Stack<Character> stack = new Stack<>();
        for(int i = 0; i < s.length(); i++) {
            char ch = s.charAt(i);
            if(ch == '(' || ch == '[' || ch == '{') {
                stack.push(ch);
            }else {
                if(stack.empty()) {
                    return false;
                }
                if(ch == ')') {
                    if(stack.pop() != '(') {
                        return false;
                    }
                }else if(ch == ']') {
                    if(stack.pop() != '[') {
                        return false;
                    }
                }else if(ch == '}') {
                    if(stack.pop() != '{') {
                        return false;
                    }
                }
            }
        }
        return stack.empty();
    }*/




}
